<%@ page import="期中22.Pd" %>
<%@ page import="期中22.Thesql" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

         <title>结果</title>

</head>

<body>
<%
  	try{
  		String arr[]=  request.getParameterValues("duixiang");
  		int duixiang1=0,duixiang2=0;
  		if(arr.length==1)
  		{
  			if(arr[0].equals("1"))
  				duixiang1=1;
  			else duixiang2=1;
  		}
  		if(arr.length==2)
  		{
  			duixiang1=1;
  			duixiang2=1;
  		}
  		String mudi=request.getParameter("mudi");
		int leixing= Integer.parseInt(request.getParameter("leixing")+"");
		String shijian=request.getParameter("shijian");
		String didian=request.getParameter("didian");
		String neirong=request.getParameter("neirong");
		String anpai=request.getParameter("anpai");
		int tid= Integer.parseInt(request.getParameter("tid")+"");
		//out.print("ok");
		
		Thesql the = new Thesql();
		the.xiugai(tid,mudi,leixing,shijian,didian,duixiang1,duixiang2,neirong,anpai);
 %>
 <script type="text/javascript" >
    alert("修改完成");         //弹出提示框输出错误信息
    window.location='Themain.jsp' ;     //跳转到登录界面
 </script>
<%
  	}
  	catch(Exception e) {
  		e.printStackTrace();
 %>
 <script type="text/javascript" >
    alert("错误:信息未输入完整，请重新输入。");         //弹出提示框输出错误信息
    window.location='Addnew.jsp' ;     //跳转到登录界面
 </script>
<%
  	}
  	
  	
  	
	//out.print(pdd.show(hb));
%>


</body>


</html>